package com.example.demo.proxy;

/**
 * @desc: <br/>
 * @author: Jingbo Hu<br/>
 * @time：2021年01⽉26⽇<br/>
 * @version：v1.0.0<br>
 */
public class ProxyTest {


    public static void main(String[] args) {
        JdkProxy jdkProxy = new JdkProxy();
        IUserManager iUserManager = (IUserManager) jdkProxy.newProxy(new IUserManagerImpl());
        iUserManager.addUser("12", "zhangsan");

        System.out.println("==============================");

        CglibProxy cglibProxy = new CglibProxy();
        IUserManager iUserManager2 = (IUserManager) cglibProxy.newProxy(new IUserManagerImpl());
        iUserManager2.addUser("13", "lisi");
    }
}
